<template>
  <div>
    <el-container>
      <el-header>
        <Header :homedata="homeData"></Header>
      </el-header>
      <el-container>
        <el-aside :width="homeData.leftWidth+'px'" :style="{height:height+'px',borderRight: '1px solid gray'}">
          <Left :homedata="homeData"/>
        </el-aside>
        <el-container>
          <el-main><Main></Main></el-main>
          <el-footer><Footer/></el-footer>
        </el-container>
      </el-container>
    </el-container>
  </div>
</template>

<script>
  import Left from "@/components/Left"
  import Header from "@/components/Header"
  import Footer from "@/components/Footer"
  import Main from "@/components/Main"

  export default {
    name:'Home',
    components: {
      Left,
      Header,
      Footer,
      Main
    },
    data() {
      return {
        height: 0,
        homeData:{
          isCollapse:false,
          leftWidth:200
        }
      }
    }, mounted() {
      this.height = document.documentElement.clientHeight - 70;
      var that = this;
      window.onresize = function () {
        that.height = document.documentElement.clientHeight - 70;
      }
    }
  }
</script>

<style scoped>
  .el-header {
    background-color: #409EFF;
    padding: 0;
  }

  .el-aside {
    width: 40px;
  }


</style>
